{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn import preprocessing\n",
    "import matplotlib.pyplot as plt \n",
    "plt.rc(\"font\", size=14)\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.model_selection import train_test_split\n",
    "import seaborn as sns\n",
    "sns.set(style=\"white\")\n",
    "sns.set(style=\"whitegrid\", color_codes=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The Data\n",
    "\n",
    "The data is related with direct marketing campaigns (phone calls) of a Portuguese banking institution. The classification goal is to predict if the client will subscribe (1/0) a term deposit (variable y).\n",
    "\n",
    "This dataset provides the customer information. It includes 41188 records and 21 fields."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(41188, 21)\n",
      "['age', 'job', 'marital', 'education', 'default', 'housing', 'loan', 'contact', 'month', 'day_of_week', 'duration', 'campaign', 'pdays', 'previous', 'poutcome', 'emp_var_rate', 'cons_price_idx', 'cons_conf_idx', 'euribor3m', 'nr_employed', 'y']\n"
     ]
    }
   ],
   "source": [
    "data = pd.read_csv('banking.csv', header=0)\n",
    "data = data.dropna()\n",
    "print(data.shape)\n",
    "print(list(data.columns))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>job</th>\n",
       "      <th>marital</th>\n",
       "      <th>education</th>\n",
       "      <th>default</th>\n",
       "      <th>housing</th>\n",
       "      <th>loan</th>\n",
       "      <th>contact</th>\n",
       "      <th>month</th>\n",
       "      <th>day_of_week</th>\n",
       "      <th>...</th>\n",
       "      <th>campaign</th>\n",
       "      <th>pdays</th>\n",
       "      <th>previous</th>\n",
       "      <th>poutcome</th>\n",
       "      <th>emp_var_rate</th>\n",
       "      <th>cons_price_idx</th>\n",
       "      <th>cons_conf_idx</th>\n",
       "      <th>euribor3m</th>\n",
       "      <th>nr_employed</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>44</td>\n",
       "      <td>blue-collar</td>\n",
       "      <td>married</td>\n",
       "      <td>basic.4y</td>\n",
       "      <td>unknown</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>cellular</td>\n",
       "      <td>aug</td>\n",
       "      <td>thu</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>999</td>\n",
       "      <td>0</td>\n",
       "      <td>nonexistent</td>\n",
       "      <td>1.4</td>\n",
       "      <td>93.444</td>\n",
       "      <td>-36.1</td>\n",
       "      <td>4.963</td>\n",
       "      <td>5228.1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>53</td>\n",
       "      <td>technician</td>\n",
       "      <td>married</td>\n",
       "      <td>unknown</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>cellular</td>\n",
       "      <td>nov</td>\n",
       "      <td>fri</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>999</td>\n",
       "      <td>0</td>\n",
       "      <td>nonexistent</td>\n",
       "      <td>-0.1</td>\n",
       "      <td>93.200</td>\n",
       "      <td>-42.0</td>\n",
       "      <td>4.021</td>\n",
       "      <td>5195.8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>28</td>\n",
       "      <td>management</td>\n",
       "      <td>single</td>\n",
       "      <td>university.degree</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>cellular</td>\n",
       "      <td>jun</td>\n",
       "      <td>thu</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>success</td>\n",
       "      <td>-1.7</td>\n",
       "      <td>94.055</td>\n",
       "      <td>-39.8</td>\n",
       "      <td>0.729</td>\n",
       "      <td>4991.6</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>39</td>\n",
       "      <td>services</td>\n",
       "      <td>married</td>\n",
       "      <td>high.school</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>cellular</td>\n",
       "      <td>apr</td>\n",
       "      <td>fri</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>999</td>\n",
       "      <td>0</td>\n",
       "      <td>nonexistent</td>\n",
       "      <td>-1.8</td>\n",
       "      <td>93.075</td>\n",
       "      <td>-47.1</td>\n",
       "      <td>1.405</td>\n",
       "      <td>5099.1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>55</td>\n",
       "      <td>retired</td>\n",
       "      <td>married</td>\n",
       "      <td>basic.4y</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>cellular</td>\n",
       "      <td>aug</td>\n",
       "      <td>fri</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>success</td>\n",
       "      <td>-2.9</td>\n",
       "      <td>92.201</td>\n",
       "      <td>-31.4</td>\n",
       "      <td>0.869</td>\n",
       "      <td>5076.2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   age          job  marital          education  default housing loan  \\\n",
       "0   44  blue-collar  married           basic.4y  unknown     yes   no   \n",
       "1   53   technician  married            unknown       no      no   no   \n",
       "2   28   management   single  university.degree       no     yes   no   \n",
       "3   39     services  married        high.school       no      no   no   \n",
       "4   55      retired  married           basic.4y       no     yes   no   \n",
       "\n",
       "    contact month day_of_week ...  campaign  pdays  previous     poutcome  \\\n",
       "0  cellular   aug         thu ...         1    999         0  nonexistent   \n",
       "1  cellular   nov         fri ...         1    999         0  nonexistent   \n",
       "2  cellular   jun         thu ...         3      6         2      success   \n",
       "3  cellular   apr         fri ...         2    999         0  nonexistent   \n",
       "4  cellular   aug         fri ...         1      3         1      success   \n",
       "\n",
       "  emp_var_rate  cons_price_idx  cons_conf_idx  euribor3m  nr_employed  y  \n",
       "0          1.4          93.444          -36.1      4.963       5228.1  0  \n",
       "1         -0.1          93.200          -42.0      4.021       5195.8  0  \n",
       "2         -1.7          94.055          -39.8      0.729       4991.6  1  \n",
       "3         -1.8          93.075          -47.1      1.405       5099.1  0  \n",
       "4         -2.9          92.201          -31.4      0.869       5076.2  1  \n",
       "\n",
       "[5 rows x 21 columns]"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Input variables\n",
    "\n",
    "1 - age (numeric)\n",
    "\n",
    "2 - job : type of job (categorical: 'admin.','blue-collar','entrepreneur','housemaid','management','retired','self-employed','services','student','technician','unemployed','unknown')\n",
    "\n",
    "3 - marital : marital status (categorical: 'divorced','married','single','unknown'; note: 'divorced' means divorced or widowed)\n",
    "\n",
    "4 - education (categorical: 'basic.4y','basic.6y','basic.9y','high.school','illiterate','professional.course','university.degree','unknown')\n",
    "\n",
    "5 - default: has credit in default? (categorical: 'no','yes','unknown')\n",
    "\n",
    "6 - housing: has housing loan? (categorical: 'no','yes','unknown')\n",
    "\n",
    "7 - loan: has personal loan? (categorical: 'no','yes','unknown')\n",
    "\n",
    "8 - contact: contact communication type (categorical: 'cellular','telephone')\n",
    "\n",
    "9 - month: last contact month of year (categorical: 'jan', 'feb', 'mar', ..., 'nov', 'dec')\n",
    "\n",
    "10 - day_of_week: last contact day of the week (categorical: 'mon','tue','wed','thu','fri')\n",
    "\n",
    "11 - duration: last contact duration, in seconds (numeric). Important note: this attribute highly affects the output target (e.g., if duration=0 then y='no'). Yet, the duration is not known before a call is performed. Also, after the end of the call y is obviously known. Thus, this input should only be included for benchmark purposes and should be discarded if the intention is to have a realistic predictive model.\n",
    "\n",
    "12 - campaign: number of contacts performed during this campaign and for this client (numeric, includes last contact)\n",
    "\n",
    "13 - pdays: number of days that passed by after the client was last contacted from a previous campaign (numeric; 999 means client was not previously contacted)\n",
    "\n",
    "14 - previous: number of contacts performed before this campaign and for this client (numeric)\n",
    "\n",
    "15 - poutcome: outcome of the previous marketing campaign (categorical: 'failure','nonexistent','success')\n",
    "\n",
    "16 - emp.var.rate: employment variation rate - (numeric)\n",
    "\n",
    "17 - cons.price.idx: consumer price index - (numeric)\n",
    "\n",
    "18 - cons.conf.idx: consumer confidence index - (numeric)\n",
    "\n",
    "19 - euribor3m: euribor 3 month rate - (numeric)\n",
    "\n",
    "20 - nr.employed: number of employees - (numeric)\n",
    "\n",
    "#### Predict variable (desired target):\n",
    "\n",
    "y - has the client subscribed a term deposit? (binary: '1','0')\n",
    "\n",
    "The education column of the dataset has many categories and we need to reduce the categories for a better modelling. The education column has the following categories:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['basic.4y', 'unknown', 'university.degree', 'high.school',\n",
       "       'basic.9y', 'professional.course', 'basic.6y', 'illiterate'],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['education'].unique()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let us group \"basic.4y\", \"basic.9y\" and \"basic.6y\" together and call them \"basic\"."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "data['education']=np.where(data['education'] =='basic.9y', 'Basic', data['education'])\n",
    "data['education']=np.where(data['education'] =='basic.6y', 'Basic', data['education'])\n",
    "data['education']=np.where(data['education'] =='basic.4y', 'Basic', data['education'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "After grouping, this is the columns."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['Basic', 'unknown', 'university.degree', 'high.school',\n",
       "       'professional.course', 'illiterate'], dtype=object)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['education'].unique()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Data exploration"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    36548\n",
       "1     4640\n",
       "Name: y, dtype: int64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['y'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEFCAYAAAAfRLtkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJz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uDSzHwl8JfAPUPuR5KWjIUYGtcBXwXIzEeB1cNtR5KWjgV3eApYDvykZ/lsRCzLzDPTrVBVVV+/sPXOd/e1vhaffvepC+Xdl7SG3YLmoSb3z4UYGieB0Z7lkZkCo91u+1+VJF0gC/Hw1MPA7wNExLXAd4bbjiQtHQtxpvEA8LqI+BbQAm4dcj+StGS0Op3OsHuQJC0QC/HwlCRpSAwNSVIxQ0OSVGwhngjXgPnoFs13EbEG+HBmrh12L4udMw2V8NEtmrci4r3AvcClw+5lKTA0VMJHt2g+ewp487CbWCoMDZWY8tEtw2pG6pWZu4GfD7uPpcLQUIk5PbpF0uJlaKiEj26RBHj1lMr46BZJgI8RkSTNgYenJEnFDA1JUjFDQ5JUzNCQJBUzNCRJxQwNSVIxQ0OSVMzQkAYsIu6PiHf3LO+rH+0tzXuGhjR49wG3AETEFcCKzHxsuC1JZXyMiDR4+4AXR8SVdMPj74fajTQHzjSkAcvMDrAT+APgbcD9w+1IKudMQxqOHcA3gf/IzB8MuRepmDMNaQgy8/vAEbrhIS0YzjSkAYuIFvAi4NeBB4fcjjQnzjSkwXsL8G/AnZn57LCbkebC92lIkoo505AkFTM0JEnFDA1JUjFDQ5JUzNCQJBX7f3A/a0hyByw+AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1984f1bc358>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='y',data=data, palette='hls')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "percentage of no subscription is 88.73458288821988\n",
      "percentage of subscription 11.265417111780131\n"
     ]
    }
   ],
   "source": [
    "count_no_sub = len(data[data['y']==0])\n",
    "count_sub = len(data[data['y']==1])\n",
    "pct_of_no_sub = count_no_sub/(count_no_sub+count_sub)\n",
    "print(\"percentage of no subscription is\", pct_of_no_sub*100)\n",
    "pct_of_sub = count_sub/(count_no_sub+count_sub)\n",
    "print(\"percentage of subscription\", pct_of_sub*100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our classes are imbalanced, and the ratio of no-subscription to subscription instances is 89:11. Before we go ahead to balance the classes, Let's do some more exploration."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>duration</th>\n",
       "      <th>campaign</th>\n",
       "      <th>pdays</th>\n",
       "      <th>previous</th>\n",
       "      <th>emp_var_rate</th>\n",
       "      <th>cons_price_idx</th>\n",
       "      <th>cons_conf_idx</th>\n",
       "      <th>euribor3m</th>\n",
       "      <th>nr_employed</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>y</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>39.911185</td>\n",
       "      <td>220.844807</td>\n",
       "      <td>2.633085</td>\n",
       "      <td>984.113878</td>\n",
       "      <td>0.132374</td>\n",
       "      <td>0.248875</td>\n",
       "      <td>93.603757</td>\n",
       "      <td>-40.593097</td>\n",
       "      <td>3.811491</td>\n",
       "      <td>5176.166600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>40.913147</td>\n",
       "      <td>553.191164</td>\n",
       "      <td>2.051724</td>\n",
       "      <td>792.035560</td>\n",
       "      <td>0.492672</td>\n",
       "      <td>-1.233448</td>\n",
       "      <td>93.354386</td>\n",
       "      <td>-39.789784</td>\n",
       "      <td>2.123135</td>\n",
       "      <td>5095.115991</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         age    duration  campaign       pdays  previous  emp_var_rate  \\\n",
       "y                                                                        \n",
       "0  39.911185  220.844807  2.633085  984.113878  0.132374      0.248875   \n",
       "1  40.913147  553.191164  2.051724  792.035560  0.492672     -1.233448   \n",
       "\n",
       "   cons_price_idx  cons_conf_idx  euribor3m  nr_employed  \n",
       "y                                                         \n",
       "0       93.603757     -40.593097   3.811491  5176.166600  \n",
       "1       93.354386     -39.789784   2.123135  5095.115991  "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.groupby('y').mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Observations:\n",
    "\n",
    "The average age of customers who bought the term deposit is higher than that of the customers who didn't. The pdays (days since the customer was last contacted) is understandably lower for the customers who bought it. The lower the pdays, the better the memory of the last call and hence the better chances of a sale. Surprisingly, campaigns (number of contacts or calls made during the current campaign) are lower for customers who bought the term deposit.\n",
    "\n",
    "We can calculate categorical means for other categorical variables such as education and marital status to get a more detailed sense of our data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>duration</th>\n",
       "      <th>campaign</th>\n",
       "      <th>pdays</th>\n",
       "      <th>previous</th>\n",
       "      <th>emp_var_rate</th>\n",
       "      <th>cons_price_idx</th>\n",
       "      <th>cons_conf_idx</th>\n",
       "      <th>euribor3m</th>\n",
       "      <th>nr_employed</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>job</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>admin.</th>\n",
       "      <td>38.187296</td>\n",
       "      <td>254.312128</td>\n",
       "      <td>2.623489</td>\n",
       "      <td>954.319229</td>\n",
       "      <td>0.189023</td>\n",
       "      <td>0.015563</td>\n",
       "      <td>93.534054</td>\n",
       "      <td>-40.245433</td>\n",
       "      <td>3.550274</td>\n",
       "      <td>5164.125350</td>\n",
       "      <td>0.129726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>blue-collar</th>\n",
       "      <td>39.555760</td>\n",
       "      <td>264.542360</td>\n",
       "      <td>2.558461</td>\n",
       "      <td>985.160363</td>\n",
       "      <td>0.122542</td>\n",
       "      <td>0.248995</td>\n",
       "      <td>93.656656</td>\n",
       "      <td>-41.375816</td>\n",
       "      <td>3.771996</td>\n",
       "      <td>5175.615150</td>\n",
       "      <td>0.068943</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>entrepreneur</th>\n",
       "      <td>41.723214</td>\n",
       "      <td>263.267857</td>\n",
       "      <td>2.535714</td>\n",
       "      <td>981.267170</td>\n",
       "      <td>0.138736</td>\n",
       "      <td>0.158723</td>\n",
       "      <td>93.605372</td>\n",
       "      <td>-41.283654</td>\n",
       "      <td>3.791120</td>\n",
       "      <td>5176.313530</td>\n",
       "      <td>0.085165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>housemaid</th>\n",
       "      <td>45.500000</td>\n",
       "      <td>250.454717</td>\n",
       "      <td>2.639623</td>\n",
       "      <td>960.579245</td>\n",
       "      <td>0.137736</td>\n",
       "      <td>0.433396</td>\n",
       "      <td>93.676576</td>\n",
       "      <td>-39.495283</td>\n",
       "      <td>4.009645</td>\n",
       "      <td>5179.529623</td>\n",
       "      <td>0.100000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>management</th>\n",
       "      <td>42.362859</td>\n",
       "      <td>257.058140</td>\n",
       "      <td>2.476060</td>\n",
       "      <td>962.647059</td>\n",
       "      <td>0.185021</td>\n",
       "      <td>-0.012688</td>\n",
       "      <td>93.522755</td>\n",
       "      <td>-40.489466</td>\n",
       "      <td>3.611316</td>\n",
       "      <td>5166.650513</td>\n",
       "      <td>0.112175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>retired</th>\n",
       "      <td>62.027326</td>\n",
       "      <td>273.712209</td>\n",
       "      <td>2.476744</td>\n",
       "      <td>897.936047</td>\n",
       "      <td>0.327326</td>\n",
       "      <td>-0.698314</td>\n",
       "      <td>93.430786</td>\n",
       "      <td>-38.573081</td>\n",
       "      <td>2.770066</td>\n",
       "      <td>5122.262151</td>\n",
       "      <td>0.252326</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>self-employed</th>\n",
       "      <td>39.949331</td>\n",
       "      <td>264.142153</td>\n",
       "      <td>2.660802</td>\n",
       "      <td>976.621393</td>\n",
       "      <td>0.143561</td>\n",
       "      <td>0.094159</td>\n",
       "      <td>93.559982</td>\n",
       "      <td>-40.488107</td>\n",
       "      <td>3.689376</td>\n",
       "      <td>5170.674384</td>\n",
       "      <td>0.104856</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>services</th>\n",
       "      <td>37.926430</td>\n",
       "      <td>258.398085</td>\n",
       "      <td>2.587805</td>\n",
       "      <td>979.974049</td>\n",
       "      <td>0.154951</td>\n",
       "      <td>0.175359</td>\n",
       "      <td>93.634659</td>\n",
       "      <td>-41.290048</td>\n",
       "      <td>3.699187</td>\n",
       "      <td>5171.600126</td>\n",
       "      <td>0.081381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>student</th>\n",
       "      <td>25.894857</td>\n",
       "      <td>283.683429</td>\n",
       "      <td>2.104000</td>\n",
       "      <td>840.217143</td>\n",
       "      <td>0.524571</td>\n",
       "      <td>-1.408000</td>\n",
       "      <td>93.331613</td>\n",
       "      <td>-40.187543</td>\n",
       "      <td>1.884224</td>\n",
       "      <td>5085.939086</td>\n",
       "      <td>0.314286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>technician</th>\n",
       "      <td>38.507638</td>\n",
       "      <td>250.232241</td>\n",
       "      <td>2.577339</td>\n",
       "      <td>964.408127</td>\n",
       "      <td>0.153789</td>\n",
       "      <td>0.274566</td>\n",
       "      <td>93.561471</td>\n",
       "      <td>-39.927569</td>\n",
       "      <td>3.820401</td>\n",
       "      <td>5175.648391</td>\n",
       "      <td>0.108260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unemployed</th>\n",
       "      <td>39.733728</td>\n",
       "      <td>249.451677</td>\n",
       "      <td>2.564103</td>\n",
       "      <td>935.316568</td>\n",
       "      <td>0.199211</td>\n",
       "      <td>-0.111736</td>\n",
       "      <td>93.563781</td>\n",
       "      <td>-40.007594</td>\n",
       "      <td>3.466583</td>\n",
       "      <td>5157.156509</td>\n",
       "      <td>0.142012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unknown</th>\n",
       "      <td>45.563636</td>\n",
       "      <td>239.675758</td>\n",
       "      <td>2.648485</td>\n",
       "      <td>938.727273</td>\n",
       "      <td>0.154545</td>\n",
       "      <td>0.357879</td>\n",
       "      <td>93.718942</td>\n",
       "      <td>-38.797879</td>\n",
       "      <td>3.949033</td>\n",
       "      <td>5172.931818</td>\n",
       "      <td>0.112121</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     age    duration  campaign       pdays  previous  \\\n",
       "job                                                                    \n",
       "admin.         38.187296  254.312128  2.623489  954.319229  0.189023   \n",
       "blue-collar    39.555760  264.542360  2.558461  985.160363  0.122542   \n",
       "entrepreneur   41.723214  263.267857  2.535714  981.267170  0.138736   \n",
       "housemaid      45.500000  250.454717  2.639623  960.579245  0.137736   \n",
       "management     42.362859  257.058140  2.476060  962.647059  0.185021   \n",
       "retired        62.027326  273.712209  2.476744  897.936047  0.327326   \n",
       "self-employed  39.949331  264.142153  2.660802  976.621393  0.143561   \n",
       "services       37.926430  258.398085  2.587805  979.974049  0.154951   \n",
       "student        25.894857  283.683429  2.104000  840.217143  0.524571   \n",
       "technician     38.507638  250.232241  2.577339  964.408127  0.153789   \n",
       "unemployed     39.733728  249.451677  2.564103  935.316568  0.199211   \n",
       "unknown        45.563636  239.675758  2.648485  938.727273  0.154545   \n",
       "\n",
       "               emp_var_rate  cons_price_idx  cons_conf_idx  euribor3m  \\\n",
       "job                                                                     \n",
       "admin.             0.015563       93.534054     -40.245433   3.550274   \n",
       "blue-collar        0.248995       93.656656     -41.375816   3.771996   \n",
       "entrepreneur       0.158723       93.605372     -41.283654   3.791120   \n",
       "housemaid          0.433396       93.676576     -39.495283   4.009645   \n",
       "management        -0.012688       93.522755     -40.489466   3.611316   \n",
       "retired           -0.698314       93.430786     -38.573081   2.770066   \n",
       "self-employed      0.094159       93.559982     -40.488107   3.689376   \n",
       "services           0.175359       93.634659     -41.290048   3.699187   \n",
       "student           -1.408000       93.331613     -40.187543   1.884224   \n",
       "technician         0.274566       93.561471     -39.927569   3.820401   \n",
       "unemployed        -0.111736       93.563781     -40.007594   3.466583   \n",
       "unknown            0.357879       93.718942     -38.797879   3.949033   \n",
       "\n",
       "               nr_employed         y  \n",
       "job                                   \n",
       "admin.         5164.125350  0.129726  \n",
       "blue-collar    5175.615150  0.068943  \n",
       "entrepreneur   5176.313530  0.085165  \n",
       "housemaid      5179.529623  0.100000  \n",
       "management     5166.650513  0.112175  \n",
       "retired        5122.262151  0.252326  \n",
       "self-employed  5170.674384  0.104856  \n",
       "services       5171.600126  0.081381  \n",
       "student        5085.939086  0.314286  \n",
       "technician     5175.648391  0.108260  \n",
       "unemployed     5157.156509  0.142012  \n",
       "unknown        5172.931818  0.112121  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.groupby('job').mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>duration</th>\n",
       "      <th>campaign</th>\n",
       "      <th>pdays</th>\n",
       "      <th>previous</th>\n",
       "      <th>emp_var_rate</th>\n",
       "      <th>cons_price_idx</th>\n",
       "      <th>cons_conf_idx</th>\n",
       "      <th>euribor3m</th>\n",
       "      <th>nr_employed</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>marital</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>divorced</th>\n",
       "      <td>44.899393</td>\n",
       "      <td>253.790330</td>\n",
       "      <td>2.61340</td>\n",
       "      <td>968.639853</td>\n",
       "      <td>0.168690</td>\n",
       "      <td>0.163985</td>\n",
       "      <td>93.606563</td>\n",
       "      <td>-40.707069</td>\n",
       "      <td>3.715603</td>\n",
       "      <td>5170.878643</td>\n",
       "      <td>0.103209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>married</th>\n",
       "      <td>42.307165</td>\n",
       "      <td>257.438623</td>\n",
       "      <td>2.57281</td>\n",
       "      <td>967.247673</td>\n",
       "      <td>0.155608</td>\n",
       "      <td>0.183625</td>\n",
       "      <td>93.597367</td>\n",
       "      <td>-40.270659</td>\n",
       "      <td>3.745832</td>\n",
       "      <td>5171.848772</td>\n",
       "      <td>0.101573</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>single</th>\n",
       "      <td>33.158714</td>\n",
       "      <td>261.524378</td>\n",
       "      <td>2.53380</td>\n",
       "      <td>949.909578</td>\n",
       "      <td>0.211359</td>\n",
       "      <td>-0.167989</td>\n",
       "      <td>93.517300</td>\n",
       "      <td>-40.918698</td>\n",
       "      <td>3.317447</td>\n",
       "      <td>5155.199265</td>\n",
       "      <td>0.140041</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unknown</th>\n",
       "      <td>40.275000</td>\n",
       "      <td>312.725000</td>\n",
       "      <td>3.18750</td>\n",
       "      <td>937.100000</td>\n",
       "      <td>0.275000</td>\n",
       "      <td>-0.221250</td>\n",
       "      <td>93.471250</td>\n",
       "      <td>-40.820000</td>\n",
       "      <td>3.313038</td>\n",
       "      <td>5157.393750</td>\n",
       "      <td>0.150000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                age    duration  campaign       pdays  previous  emp_var_rate  \\\n",
       "marital                                                                         \n",
       "divorced  44.899393  253.790330   2.61340  968.639853  0.168690      0.163985   \n",
       "married   42.307165  257.438623   2.57281  967.247673  0.155608      0.183625   \n",
       "single    33.158714  261.524378   2.53380  949.909578  0.211359     -0.167989   \n",
       "unknown   40.275000  312.725000   3.18750  937.100000  0.275000     -0.221250   \n",
       "\n",
       "          cons_price_idx  cons_conf_idx  euribor3m  nr_employed         y  \n",
       "marital                                                                    \n",
       "divorced       93.606563     -40.707069   3.715603  5170.878643  0.103209  \n",
       "married        93.597367     -40.270659   3.745832  5171.848772  0.101573  \n",
       "single         93.517300     -40.918698   3.317447  5155.199265  0.140041  \n",
       "unknown        93.471250     -40.820000   3.313038  5157.393750  0.150000  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.groupby('marital').mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>duration</th>\n",
       "      <th>campaign</th>\n",
       "      <th>pdays</th>\n",
       "      <th>previous</th>\n",
       "      <th>emp_var_rate</th>\n",
       "      <th>cons_price_idx</th>\n",
       "      <th>cons_conf_idx</th>\n",
       "      <th>euribor3m</th>\n",
       "      <th>nr_employed</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>education</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Basic</th>\n",
       "      <td>42.163910</td>\n",
       "      <td>263.043874</td>\n",
       "      <td>2.559498</td>\n",
       "      <td>974.877967</td>\n",
       "      <td>0.141053</td>\n",
       "      <td>0.191329</td>\n",
       "      <td>93.639933</td>\n",
       "      <td>-40.927595</td>\n",
       "      <td>3.729654</td>\n",
       "      <td>5172.014113</td>\n",
       "      <td>0.087029</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>high.school</th>\n",
       "      <td>37.998213</td>\n",
       "      <td>260.886810</td>\n",
       "      <td>2.568576</td>\n",
       "      <td>964.358382</td>\n",
       "      <td>0.185917</td>\n",
       "      <td>0.032937</td>\n",
       "      <td>93.584857</td>\n",
       "      <td>-40.940641</td>\n",
       "      <td>3.556157</td>\n",
       "      <td>5164.994735</td>\n",
       "      <td>0.108355</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>illiterate</th>\n",
       "      <td>48.500000</td>\n",
       "      <td>276.777778</td>\n",
       "      <td>2.277778</td>\n",
       "      <td>943.833333</td>\n",
       "      <td>0.111111</td>\n",
       "      <td>-0.133333</td>\n",
       "      <td>93.317333</td>\n",
       "      <td>-39.950000</td>\n",
       "      <td>3.516556</td>\n",
       "      <td>5171.777778</td>\n",
       "      <td>0.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>professional.course</th>\n",
       "      <td>40.080107</td>\n",
       "      <td>252.533855</td>\n",
       "      <td>2.586115</td>\n",
       "      <td>960.765974</td>\n",
       "      <td>0.163075</td>\n",
       "      <td>0.173012</td>\n",
       "      <td>93.569864</td>\n",
       "      <td>-40.124108</td>\n",
       "      <td>3.710457</td>\n",
       "      <td>5170.155979</td>\n",
       "      <td>0.113485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>university.degree</th>\n",
       "      <td>38.879191</td>\n",
       "      <td>253.223373</td>\n",
       "      <td>2.563527</td>\n",
       "      <td>951.807692</td>\n",
       "      <td>0.192390</td>\n",
       "      <td>-0.028090</td>\n",
       "      <td>93.493466</td>\n",
       "      <td>-39.975805</td>\n",
       "      <td>3.529663</td>\n",
       "      <td>5163.226298</td>\n",
       "      <td>0.137245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unknown</th>\n",
       "      <td>43.481225</td>\n",
       "      <td>262.390526</td>\n",
       "      <td>2.596187</td>\n",
       "      <td>942.830734</td>\n",
       "      <td>0.226459</td>\n",
       "      <td>0.059099</td>\n",
       "      <td>93.658615</td>\n",
       "      <td>-39.877816</td>\n",
       "      <td>3.571098</td>\n",
       "      <td>5159.549509</td>\n",
       "      <td>0.145003</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                           age    duration  campaign       pdays  previous  \\\n",
       "education                                                                    \n",
       "Basic                42.163910  263.043874  2.559498  974.877967  0.141053   \n",
       "high.school          37.998213  260.886810  2.568576  964.358382  0.185917   \n",
       "illiterate           48.500000  276.777778  2.277778  943.833333  0.111111   \n",
       "professional.course  40.080107  252.533855  2.586115  960.765974  0.163075   \n",
       "university.degree    38.879191  253.223373  2.563527  951.807692  0.192390   \n",
       "unknown              43.481225  262.390526  2.596187  942.830734  0.226459   \n",
       "\n",
       "                     emp_var_rate  cons_price_idx  cons_conf_idx  euribor3m  \\\n",
       "education                                                                     \n",
       "Basic                    0.191329       93.639933     -40.927595   3.729654   \n",
       "high.school              0.032937       93.584857     -40.940641   3.556157   \n",
       "illiterate              -0.133333       93.317333     -39.950000   3.516556   \n",
       "professional.course      0.173012       93.569864     -40.124108   3.710457   \n",
       "university.degree       -0.028090       93.493466     -39.975805   3.529663   \n",
       "unknown                  0.059099       93.658615     -39.877816   3.571098   \n",
       "\n",
       "                     nr_employed         y  \n",
       "education                                   \n",
       "Basic                5172.014113  0.087029  \n",
       "high.school          5164.994735  0.108355  \n",
       "illiterate           5171.777778  0.222222  \n",
       "professional.course  5170.155979  0.113485  \n",
       "university.degree    5163.226298  0.137245  \n",
       "unknown              5159.549509  0.145003  "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.groupby('education').mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Visualizations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAFJCAYAAACB97o3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XmcXFWZ//FPQhJBNkUQgbAoyBcGFyAoKktAUWQbEJF9kE1AQUTiT1FRAgIjy+CAoCDIsCPLsAiyBGQVQSY9gATkQRZBJkEWRRbDEtK/P84pUmlvd1eSOrc61d/369WvruXWPad6qeee7Tkjent7MTMz62tkpytgZmZDkwOEmZlVcoAwM7NKDhBmZlbJAcLMzCo5QJiZWaVRna6AdZ6klYBHgfubHh4BnBgRZ7apjLOAKRFxfDvONwfl9gJTgDebHp4cEXvXWY+6SPousC9wY0Ts2YbzTQSWjIgDBjhmJdLvdpFBznUIsGO+uwrwLPD3fP/zwI+Bb0TEg5ImATtHxHOS/gRsFxGT5+Gt2FxwgLCG6RGxZuOOpOWAKZImR8TvO1ivdtg4Ip7rdCVqshfpg/U3na5IXxHxQ+CHAJJuAU6OiEubDtm86fana6ya9cMBwipFxP9J+iOwqqS1SVdwWwJI2r1xP7cMlgBWBq4GfkC6ElwPmAFcAXw3n/YTkn4LLE26qt85Il6RtCfpqndMPtcPI+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HCzMwqOUCYmVml/w/UbSKNeHv7ZgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1985a470940>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "pd.crosstab(data.job,data.y).plot(kind='bar')\n",
    "plt.title('Purchase Frequency for Job Title')\n",
    "plt.xlabel('Job')\n",
    "plt.ylabel('Frequency of Purchase')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The frequency of purchase of the deposit depends a great deal on the job title. Thus, the job title can be a good predictor of the outcome variable."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Proportion of Customers')"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEzCAYAAAA4mdRkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XecJFW9/vHPBnAlCxhAgoDyiCBpiQreRcmSLyIqGQT0qldBUUQFkShigh9BEBEuCCggSYJI0iXJEmQJDy4KwlW8oASRuOz8/jg10I67M70zXd3b08/79ZrXTqXT366tqW+dU6dOjenr6yMiInrP2E4HEBERnZEEEBHRo5IAIiJ6VBJARESPSgKIiOhRSQARET1qfKcDGC0krQMcCSxCSayPAJ+3fU+1/Crgo7afGEbZk4Djba80gviOB56wfciA+bsB3wP+CIwB5gL+AHzc9l+G+3lV2QsBhwKTgBlAH+V7/LBa/hCwve3bRvAZawJ72t53Nrc7EdgUONv2QQ3zdwN+BBxq++CG+WOAB4HnZvf/QdIvKMfCvc0cB4P9f7fqOBvJ8dhK1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IWBxytX51waJ5y3APA3TxwNrSlqIMnTwfJIOAo6ryl2iKvdqYC/g+8Diki4EPgdcZ/ttVTyHVGUeDpwGrFRNn2D7lKF2VESj1ABitDiP6qlMSWsCv6Oc6JG0ALANpblmJeBS4FMN215uW8D/AVTvdj4JOMn2jyjjv//E9jrAu4HPSlp0kFgOpLwi9FFJPwY+CFxv+ynga8DFtg+v5t9pe13gHcB/AKtT3ofw5yGagN4DLGx7taqc9ZvZSRGNkgBitLgY2EzSWErzz6vvE7D9DPBRYMfqQZ4tKS/17nfLYAXb/hbwJ0mfB75HeVn9vIOsfwXwVsrV/OOUl9ucP5P1fgL8UtJnKbWBRQbENZipgCRdCXwI+EKT20W8KgkgRgXbz1IezFmPMjpjY/PPksBNlCacy4HTeW0Ib4DnBytb0rGUq/KHgcOAJwZs37juwpK+Y/sF21fY/jyl1rCxpDcOWPfTwDGUJHEc5WbxwHL7Bsybq/q+fwNWrLYTcHvVxBTRtCSAGE3OA44CbrM9vWH+msA0298BfgtsC4ybyfaNpvPaPbKNgGNs/5Rysn3rINs/DWwlaZeGee8C/gr8fSblnmz7LMorBletym1c5ylgYUlvlPQ6YFMASVsBZwKXUZLTs8CSQ3yniH+RBBCjySWUk+jA10leBYyVdC9wO+Vx/mWGKOsG4GPVVfqRwJmSplLuHdw2q+1tv0K5ifxhSQ9Luo9Sa9iyWnYrsI6ko4DvAgdLurv6/caq3L9Smpyutf00pQnpt5Raza3VR11OqbncU837H9t3D7WDIhplKIiIiB6VGkBERI9KAoiI6FFJABERPSoJICKiRyUBRET0qCSAiIgelQQQEdGjkgAiInrU/wcmadAIY/a2rwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1985c1d22e8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "table=pd.crosstab(data.marital,data.y)\n",
    "table.div(table.sum(1).astype(float), axis=0).plot(kind='bar', stacked=True)\n",
    "plt.title('Stacked Bar Chart of Marital Status vs Purchase')\n",
    "plt.xlabel('Marital Status')\n",
    "plt.ylabel('Proportion of Customers')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Hard to see, but the marital status does not seem a strong predictor for the outcome variable."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Proportion of Customers')"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAFiCAYAAAD/Sw82AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xu8ZXP9x/HXzLhMGEnKLQrpndzSSEiiohKl8tNN5VZUuqlfFymXRIWucokURVLyE4UoRYQal0jeUpFCucRQbmPO74/v2uw5zZzZc2avvc7e+/18PM7j7LXW3mt/1j77rM/6fr/r+/1OGhkZISIihs/kpgOIiIhmJAFERAypJICIiCGVBBARMaSSACIihlQSQETEkFqk6QCGjaSNgUOAJ1MS8C3Ah23/vtr+U+DNtu8cx763AI6wvc5CxHcEcKft/Uet3xn4MvAXYBKwKPBn4B22bxvv+1X7XgY4ENgCmA2MUI7jG9X2m4AdbP92Id7j+cButvdcwNcdBbwCONn2J9rWbwGcDXjUS+60/bK57Geun+vCkrQacJjt10taCfiB7U27+R7jjGtnHv++jFC+M/+mfNd/3aX3uImF/F4MuySAHpK0OHAWsLXtK6p1OwFnS1rN9qPAVk3GOB8X2d62tSDpSMqJ+x3j3aGkqcAvgZOA59meJenpwM8k0UoCXbA28LRxvG4PYFXbf5vLtj/Zfu7ChbXQng4IwPatQOMn/zajvy/bAT+UtIrtWQ3GFZUkgN5aAlgGWKpt3UnATGCKpOOqdRdI2g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HKj9jva6NL3JB7/f2yf6nF0fBFdkyqgGHa/AjaRtLKkycAb2rbdCaxdPX4NgO17gb9J2rpa/1bKif9lwKm2vwncA2wJTKme86ik0RdbP6cqAVSliu2phnWI6JWUAGKYrCTpqlHrLgTeC5wP/Js5bxPdD/iqpP2Ac9vW7wQcJenzlCTxVsoV/8mS3gQ8DFwMrFY9/wzgaknT2/ZxIHCkpGsoieIztq9oaweIqF2GgoiIGFKpAoqIGFJJABERQyoJICJiSCUBREQMqSSAiIghlQQQETGkkgAiIoZUEkBExJD6fzImSRX9w/QXAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1985c3050f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "table=pd.crosstab(data.education,data.y)\n",
    "table.div(table.sum(1).astype(float), axis=0).plot(kind='bar', stacked=True)\n",
    "plt.title('Stacked Bar Chart of Education vs Purchase')\n",
    "plt.xlabel('Education')\n",
    "plt.ylabel('Proportion of Customers')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Education seems a good predictor of the outcome variable."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Frequency of Purchase')"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEeCAYAAACQfIJ4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XmcXFWZ//FPJyEsJoAMmxCWAczXGZStUXYSNiObMAiy6IAgohgUnPgbQVAiiLIJg2wiDCIICGTYISRA2GSVHoKsD6sgAyqJAgEiIUn//jin6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
       "<matplotlib.figure.Figure at 0x1985e6c1198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.crosstab(data.day_of_week,data.y).plot(kind='bar')\n",
    "plt.title('Purchase Frequency for Day of Week')\n",
    "plt.xlabel('Day of Week')\n",
    "plt.ylabel('Frequency of Purchase')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Day of week may not be a good predictor of the outcome."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Frequency of Purchase')"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEdCAYAAADwwTuSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XmYXFWd//F3N0mAkRhFFoWAGcF8cAeaVZYEBGNYhEEkyCYiyw/jgsZBEYSAwjOgwwwosgQjiEYJYQmgkMCwGCMa6SFIEL5sCjKiQGQJW0KS+v1xbplK0911011163b683qePKm6dfqeT1Un9a1z7q1z2yqVCmZmZnm0tzqAmZkNHC4aZmaWm4uGmZnl5qJhZma5uWiYmVluLhpmZpbbkFYHsIFH0ijgUeC+ms1twHkRMbVBfVwGLIiI7zZif6vQbwVYACyr2Xx3RBxdZI6iSDoZOA64NSKO6uM+LgM+DeweEbfXbB8FPAb8ICI+38d9/yvw3Yj4RLa/BRGxTl/2ZY3homF99WpEbFm9I2ljYIGkuyPiDy3M1Qi7RcSzrQ5RkM8Ch0TEr/u5nyeAw4Hba7YdATzdz/2+E1A/92EN5KJhDRER/yfpYWC0pK2BAyNiHwBJR1bvZ59K1wU2A24EvgV8D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PuB9RoZ2mxVuGiYNUh2IZ57gZ2B3cmmpnjj/7M2Vp4arl60p0LPl9JdmvXhL1ZZS7lomDXWdOA/gLuzJbMB1gZ2kDQqu38sK4579GQpPuZoJeR/lGaNdQNpldHalYD/TioU10oaBjwOfLbOfm4FzpLU6mtmmK3Ey4iYmVlunp4yM7PcXDTMzCw3Fw0zM8vNRcPMzHJz0TAzs9xcNMzMLDcXDTMzy+3/A/daz7VRmmKJAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1985c1aad30>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.crosstab(data.month,data.y).plot(kind='bar')\n",
    "plt.title('Purchase Frequency for Month')\n",
    "plt.xlabel('Month')\n",
    "plt.ylabel('Frequency of Purchase')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Month might be a good predictor of the outcome variable."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Frequency')"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAETCAYAAAAh/OHhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGnRJREFUeJzt3X+8XHV95/HXDSHgj0BFQBcB2cry2S1bQa40KD8SKxojIK5uKypFwIKtAcXG4kOKEq0/Fgv4AKViUQxQo1UQKXSBWAWMgRadBSsVP1RUeLC6VlBMUH4lufvHObeMl8m9873cOXOS+3o+Hnlk5jvfmfOZM3PnPd/znXPOyNjYGJIk9WvOsAuQJG1eDA5JUhGDQ5JUxOCQJBUxOCRJRQwOSVIRg0N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nhERv1v3ewMwlpm/BP4tIo4GiIiXAV8fRuHSZBxxSINzLNURW7udD5wKvBy4JCI2Asnjp9V9I3BBfcrPR4HXdZ14R2oFf1UlNaw+1en/At6Xmb+KiD8DnpOZy4ZcmtQXN1VJDcvMjVTzFt+sJ8EPAT403Kqk/jnikCQVccQhSSpicEiSihgckqQiBockqYjBIUkq8v8BKzppMiL9OeMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1985bfd5518>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data.age.hist()\n",
    "plt.title('Histogram of Age')\n",
    "plt.xlabel('Age')\n",
    "plt.ylabel('Frequency')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Most customers of the bank in this dataset are in the age range of 30-40."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Frequency of Purchase')"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAE+CAYAAABx+UwKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XmYHFW5x/HvZGPRgIDADYRFQH4oXsEMQhAwYc1lEy4iIIsKIirRC5f4iApIROSyX9l3ZNGwhU0QSEQgxLAEWkDC8iKERS4gEIREiFnn/lFnoBlnpquTTFX3zO/zPPNMVfWpqre6Zvrtc07VqZa2tjbMzMzy6Fd2AGZm1jycNMzMLDcnDTMzy81Jw8zMcnPSMDOz3Jw0zMwstwFlB2CNQdLawHPA41WLW4AzIuLSJbSPy4BpEXHqktheHfttA6YBC6oWPxwRBxcZR1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miUZmVxEnDrD53A/8jaThwBtlT+N4Evh0Rz0q6BxgbEfekmso9wE7AdwAkvQjcTDa67QbAHOCIiLgr1UaOJ2s2np62+TdJLwBXAdsD84GfA2OATwJjIuJaSasCFwBrAAuBH0fEnT37Vlhf5D4Ns5wkDQT2BB4Crga+FxEbAeeTfah3KiKeTGXOj4hfkX3oPxsRnwIOAH4haRWyD/3dI+KzwBTg7KrNvBYRmwBPAT8CdgD2B36cXj8DuDQiWoEvARdIGrxkjtzsA04aZt1bTdKjkh4F/kz20KTLgL9HxEMAEXEdsJ6k5XNucwTZMzWIiMcjYnNgU2BqRLyQylwIbFu1zu3p94vApIiYn6ZXSMu3A45Lcd4ODATWrfNYzWpy85RZ9z7UpwEg6bOdlGsB+pN1mLc/jW9gF9ucR9WQ6JI24F+/wLXw4f/PuVXT8zvZZn9gm4h4K21zCPB6F/s3W2SuaZjVL4CVJH0eQNJewIvpA/tNYMNUbveqdebzQRK4l9SRnhLGHcCDwPDUDwJwCFn/SV53AYembX4amAYsW9dRmeXgmoZZnSJijqS9gbMlfQR4C9g7vXwycLmkg4Cbqla7Ny3/G3AscJGkx8iSyQGpw/sQ4EZJg8ianr5ZR1jfBy6U1N6Etn9EzFqMwzTrlIcRMTOz3Nw8ZWZmuTlpmJlZbk4aZmaWm5OGmZnl5qRhZma5OWmYmVluThpmZpabk4aZmeX2/998RATMxk+dAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1985e74e208>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.crosstab(data.poutcome,data.y).plot(kind='bar')\n",
    "plt.title('Purchase Frequency for Poutcome')\n",
    "plt.xlabel('Poutcome')\n",
    "plt.ylabel('Frequency of Purchase')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Poutcome seems to be a good predictor of the outcome variable."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Create dummy variables"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['age', 'duration', 'campaign', 'pdays', 'previous', 'emp_var_rate',\n",
       "       'cons_price_idx', 'cons_conf_idx', 'euribor3m', 'nr_employed', 'y',\n",
       "       'job_admin.', 'job_blue-collar', 'job_entrepreneur',\n",
       "       'job_housemaid', 'job_management', 'job_retired',\n",
       "       'job_self-employed', 'job_services', 'job_student',\n",
       "       'job_technician', 'job_unemployed', 'job_unknown',\n",
       "       'marital_divorced', 'marital_married', 'marital_single',\n",
       "       'marital_unknown', 'education_basic.4y', 'education_basic.6y',\n",
       "       'education_basic.9y', 'education_high.school',\n",
       "       'education_illiterate', 'education_professional.course',\n",
       "       'education_university.degree', 'education_unknown', 'default_no',\n",
       "       'default_unknown', 'default_yes', 'housing_no', 'housing_unknown',\n",
       "       'housing_yes', 'loan_no', 'loan_unknown', 'loan_yes',\n",
       "       'contact_cellular', 'contact_telephone', 'month_apr', 'month_aug',\n",
       "       'month_dec', 'month_jul', 'month_jun', 'month_mar', 'month_may',\n",
       "       'month_nov', 'month_oct', 'month_sep', 'day_of_week_fri',\n",
       "       'day_of_week_mon', 'day_of_week_thu', 'day_of_week_tue',\n",
       "       'day_of_week_wed', 'poutcome_failure', 'poutcome_nonexistent',\n",
       "       'poutcome_success'], dtype=object)"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cat_vars=['job','marital','education','default','housing','loan','contact','month','day_of_week','poutcome']\n",
    "for var in cat_vars:\n",
    "    cat_list='var'+'_'+var\n",
    "    cat_list = pd.get_dummies(data[var], prefix=var)\n",
    "    data1=data.join(cat_list)\n",
    "    data=data1\n",
    "    \n",
    "cat_vars=['job','marital','education','default','housing','loan','contact','month','day_of_week','poutcome']\n",
    "data_vars=data.columns.values.tolist()\n",
    "to_keep=[i for i in data_vars if i not in cat_vars]\n",
    "data_final=data[to_keep]\n",
    "data_final.columns.values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Over-sampling using SMOTE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = data_final.loc[:, data_final.columns != 'y']\n",
    "y = data_final.loc[:, data_final.columns == 'y']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\SusanLi\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py:578: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n",
      "  y = column_or_1d(y, warn=True)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "length of oversampled data is  51134\n",
      "Number of no subscription in oversampled data 25567\n",
      "Number of subscription 25567\n",
      "Proportion of no subscription data in oversampled data is  0.5\n",
      "Proportion of subscription data in oversampled data is  0.5\n"
     ]
    }
   ],
   "source": [
    "from imblearn.over_sampling import SMOTE\n",
    "\n",
    "os = SMOTE(random_state=0)\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=0)\n",
    "columns = X_train.columns\n",
    "\n",
    "os_data_X,os_data_y=os.fit_sample(X_train, y_train)\n",
    "os_data_X = pd.DataFrame(data=os_data_X,columns=columns )\n",
    "os_data_y= pd.DataFrame(data=os_data_y,columns=['y'])\n",
    "# we can Check the numbers of our data\n",
    "print(\"length of oversampled data is \",len(os_data_X))\n",
    "print(\"Number of no subscription in oversampled data\",len(os_data_y[os_data_y['y']==0]))\n",
    "print(\"Number of subscription\",len(os_data_y[os_data_y['y']==1]))\n",
    "print(\"Proportion of no subscription data in oversampled data is \",len(os_data_y[os_data_y['y']==0])/len(os_data_X))\n",
    "print(\"Proportion of subscription data in oversampled data is \",len(os_data_y[os_data_y['y']==1])/len(os_data_X))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Recursive feature elimination"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_final_vars=data_final.columns.values.tolist()\n",
    "y=['y']\n",
    "X=[i for i in data_final_vars if i not in y]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[False False False False False False False False  True False False  True\n",
      " False  True False False False False False False False False False False\n",
      " False  True False False False False  True False False False  True  True\n",
      " False False False False False False False  True  True  True  True  True\n",
      "  True  True  True  True  True  True False False False False False False\n",
      "  True False  True]\n",
      "[39 38 26 42  9 12 24 36  1 35  8  1  7  1  5 32  2  4 31  3  6 10 23 21\n",
      " 17  1 14 18 15 22  1 20 16 19  1  1 41 28 44 37 33 43 34  1  1  1  1  1\n",
      "  1  1  1  1  1  1 29 30 11 27 40 25  1 13  1]\n"
     ]
    }
   ],
   "source": [
    "from sklearn import datasets\n",
    "from sklearn.feature_selection import RFE\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "\n",
    "logreg = LogisticRegression()\n",
    "\n",
    "rfe = RFE(logreg, 20)\n",
    "rfe = rfe.fit(os_data_X, os_data_y.values.ravel())\n",
    "print(rfe.support_)\n",
    "print(rfe.ranking_)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The Recursive Feature Elimination (RFE) has helped us select the following features: \"previous\", \"euribor3m\", \"job_blue-collar\", \"job_retired\", \"job_services\", \"job_student\", \"default_no\", \"month_aug\", \"month_dec\", \"month_jul\", \"month_nov\", \"month_oct\", \"month_sep\", \"day_of_week_fri\", \"day_of_week_wed\", \"poutcome_failure\", \"poutcome_nonexistent\", \"poutcome_success\"."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [],
   "source": [
    "cols=['euribor3m', 'job_blue-collar', 'job_housemaid', 'marital_unknown', 'education_illiterate', 'default_no', 'default_unknown', \n",
    "      'contact_cellular', 'contact_telephone', 'month_apr', 'month_aug', 'month_dec', 'month_jul', 'month_jun', 'month_mar', \n",
    "      'month_may', 'month_nov', 'month_oct', \"poutcome_failure\", \"poutcome_success\"] \n",
    "X=os_data_X[cols]\n",
    "y=os_data_y['y']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Implementing the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Warning: Maximum number of iterations has been exceeded.\n",
      "         Current function value: 0.545891\n",
      "         Iterations: 35\n",
      "                                Results: Logit\n",
      "==============================================================================\n",
      "Model:                   Logit                No. Iterations:       35.0000   \n",
      "Dependent Variable:      y                    Pseudo R-squared:     0.212     \n",
      "Date:                    2018-09-10 12:16     AIC:                  55867.1778\n",
      "No. Observations:        51134                BIC:                  56044.0219\n",
      "Df Model:                19                   Log-Likelihood:       -27914.   \n",
      "Df Residuals:            51114                LL-Null:              -35443.   \n",
      "Converged:               0.0000               Scale:                1.0000    \n",
      "------------------------------------------------------------------------------\n",
      "                      Coef.    Std.Err.    z     P>|z|     [0.025     0.975]  \n",
      "------------------------------------------------------------------------------\n",
      "euribor3m             -0.4634    0.0091 -50.9471 0.0000     -0.4813    -0.4456\n",
      "job_blue-collar       -0.1736    0.0283  -6.1230 0.0000     -0.2291    -0.1180\n",
      "job_housemaid         -0.3260    0.0778  -4.1912 0.0000     -0.4784    -0.1735\n",
      "marital_unknown        0.7454    0.2253   3.3082 0.0009      0.3038     1.1870\n",
      "education_illiterate   1.3156    0.4373   3.0084 0.0026      0.4585     2.1727\n",
      "default_no            16.1521 5414.0744   0.0030 0.9976 -10595.2387 10627.5429\n",
      "default_unknown       15.8945 5414.0744   0.0029 0.9977 -10595.4963 10627.2853\n",
      "contact_cellular     -13.9393 5414.0744  -0.0026 0.9979 -10625.3302 10597.4515\n",
      "contact_telephone    -14.0065 5414.0744  -0.0026 0.9979 -10625.3973 10597.3843\n",
      "month_apr             -0.8356    0.0913  -9.1490 0.0000     -1.0145    -0.6566\n",
      "month_aug             -0.6882    0.0929  -7.4053 0.0000     -0.8703    -0.5061\n",
      "month_dec             -0.4233    0.1655  -2.5579 0.0105     -0.7477    -0.0990\n",
      "month_jul             -0.4056    0.0935  -4.3391 0.0000     -0.5889    -0.2224\n",
      "month_jun             -0.4817    0.0917  -5.2550 0.0000     -0.6614    -0.3021\n",
      "month_mar              0.6638    0.1229   5.3989 0.0000      0.4228     0.9047\n",
      "month_may             -1.4752    0.0874 -16.8815 0.0000     -1.6465    -1.3039\n",
      "month_nov             -0.8298    0.0942  -8.8085 0.0000     -1.0144    -0.6451\n",
      "month_oct              0.5065    0.1175   4.3111 0.0000      0.2762     0.7367\n",
      "poutcome_failure      -0.5000    0.0363 -13.7706 0.0000     -0.5711    -0.4288\n",
      "poutcome_success       1.5788    0.0618  25.5313 0.0000      1.4576     1.7000\n",
      "==============================================================================\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\SusanLi\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\statsmodels\\base\\model.py:496: ConvergenceWarning: Maximum Likelihood optimization failed to converge. Check mle_retvals\n",
      "  \"Check mle_retvals\", ConvergenceWarning)\n"
     ]
    }
   ],
   "source": [
    "import statsmodels.api as sm\n",
    "logit_model=sm.Logit(y,X)\n",
    "result=logit_model.fit()\n",
    "print(result.summary2())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The p-values for four variables are very high, therefore, we will remove them."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [],
   "source": [
    "cols=['euribor3m', 'job_blue-collar', 'job_housemaid', 'marital_unknown', 'education_illiterate', \n",
    "      'month_apr', 'month_aug', 'month_dec', 'month_jul', 'month_jun', 'month_mar', \n",
    "      'month_may', 'month_nov', 'month_oct', \"poutcome_failure\", \"poutcome_success\"] \n",
    "X=os_data_X[cols]\n",
    "y=os_data_y['y']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimization terminated successfully.\n",
      "         Current function value: 0.555865\n",
      "         Iterations 7\n",
      "                           Results: Logit\n",
      "=====================================================================\n",
      "Model:                Logit             No. Iterations:    7.0000    \n",
      "Dependent Variable:   y                 Pseudo R-squared:  0.198     \n",
      "Date:                 2018-09-10 12:38  AIC:               56879.2425\n",
      "No. Observations:     51134             BIC:               57020.7178\n",
      "Df Model:             15                Log-Likelihood:    -28424.   \n",
      "Df Residuals:         51118             LL-Null:           -35443.   \n",
      "Converged:            1.0000            Scale:             1.0000    \n",
      "---------------------------------------------------------------------\n",
      "                      Coef.  Std.Err.    z     P>|z|   [0.025  0.975]\n",
      "---------------------------------------------------------------------\n",
      "euribor3m            -0.4488   0.0074 -60.6837 0.0000 -0.4633 -0.4343\n",
      "job_blue-collar      -0.2060   0.0278  -7.4032 0.0000 -0.2605 -0.1515\n",
      "job_housemaid        -0.2784   0.0762  -3.6519 0.0003 -0.4278 -0.1290\n",
      "marital_unknown       0.7619   0.2244   3.3956 0.0007  0.3221  1.2017\n",
      "education_illiterate  1.3080   0.4346   3.0096 0.0026  0.4562  2.1598\n",
      "month_apr             1.2863   0.0380  33.8180 0.0000  1.2118  1.3609\n",
      "month_aug             1.3959   0.0411  33.9688 0.0000  1.3153  1.4764\n",
      "month_dec             1.8084   0.1441  12.5483 0.0000  1.5259  2.0908\n",
      "month_jul             1.6747   0.0424  39.5076 0.0000  1.5916  1.7578\n",
      "month_jun             1.5574   0.0408  38.1351 0.0000  1.4773  1.6374\n",
      "month_mar             2.8215   0.0908  31.0891 0.0000  2.6437  2.9994\n",
      "month_may             0.5848   0.0304  19.2166 0.0000  0.5251  0.6444\n",
      "month_nov             1.2725   0.0445  28.5720 0.0000  1.1852  1.3598\n",
      "month_oct             2.7279   0.0816  33.4350 0.0000  2.5680  2.8878\n",
      "poutcome_failure     -0.2797   0.0351  -7.9753 0.0000 -0.3485 -0.2110\n",
      "poutcome_success      1.9617   0.0602  32.5939 0.0000  1.8438  2.0797\n",
      "=====================================================================\n",
      "\n"
     ]
    }
   ],
   "source": [
    "logit_model=sm.Logit(y,X)\n",
    "result=logit_model.fit()\n",
    "print(result.summary2())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Logistic Regression Model Fitting"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n",
       "          intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1,\n",
       "          penalty='l2', random_state=None, solver='liblinear', tol=0.0001,\n",
       "          verbose=0, warm_start=False)"
      ]
     },
     "execution_count": 119,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn import metrics\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=0)\n",
    "logreg = LogisticRegression()\n",
    "logreg.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy of logistic regression classifier on test set: 0.74\n"
     ]
    }
   ],
   "source": [
    "y_pred = logreg.predict(X_test)\n",
    "print('Accuracy of logistic regression classifier on test set: {:.2f}'.format(logreg.score(X_test, y_test)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Confusion Matrix"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[6124 1542]\n",
      " [2505 5170]]\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import confusion_matrix\n",
    "confusion_matrix = confusion_matrix(y_test, y_pred)\n",
    "print(confusion_matrix)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "             precision    recall  f1-score   support\n",
      "\n",
      "          0       0.71      0.80      0.75      7666\n",
      "          1       0.77      0.67      0.72      7675\n",
      "\n",
      "avg / total       0.74      0.74      0.74     15341\n",
      "\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import classification_report\n",
    "print(classification_report(y_test, y_pred))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Interpretation:\n",
    "\n",
    "Of the entire test set, 74% of the promoted term deposit were the term deposit that the customers liked. Of the entire test set, 74% of the customer's preferred term deposit were promoted."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAETCAYAAADd6corAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzs3Xd4FNUax/Hv1vRCCoQAgSRApEpRkaaCgvQiIkUpShPbVbGADaTJVa/XC14QELEhgiAWREWQa6EpoYO0BBI6JKRtstk25/4RWMCAoSTZbPJ+nicPW2Zn3p1d5rczc+YcnVJKIYQQQlxA7+kChBBClD0SDkIIIQqRcBBCCFGIhIMQQohCJByEEEIUIuEghBCiEAmHCiQhIYHu3bvTs2dPevXqxd13302fPn3YsWNHiSyvZ8+eZGdnl8i8PWX79u288sorAOzYsYMnnniixJeZkJDAmTNnSnw5f/XSSy+xc+fOq35dUZ97Tk4OgwcPvuLphWcYPV2AKF0ffvghYWFh7vvz5s1j8uTJLFq0qNiX9dVXXxX7PD3twIEDnDx5EoBGjRoxffp0D1dUctatW0e/fv2u+nVFfe5ZWVkX/SApj9+T8kDCoQJzOp0cP36ckJAQ92OzZs1i5cqVaJpGtWrVGD9+PFWqVOH06dOMHz+e5ORk9Ho9/fv3Z/DgweTk5DBlyhT27duHw+GgZcuWPPfccxiNRhISEli/fj2PPPIIDz74IHfffTcAb7zxBgDPPvssn3/+OQsXLkTTNEJDQ3n55ZeJj49n7NixZGZmcvjwYe644w6effbZi2pftGgRH3/8MXq9noiICF5++WViY2MZO3YsPj4+7Nmzh/T0dFq3bs1LL72EyWQiKSmJKVOmkJmZicvlYtCgQdx7771s3LiRKVOm4O/vT25uLkuXLuX1119n27Zt5ObmopRi8uTJREdHM336dHJychg3bhy9evVi0qRJLF++nLFjxxIYGMjevXs5ceIECQkJ/POf/yQgIICff/6ZN998E71eT7169Vi3bh2ffvop1atXv+g9bdu2jcmTJ2O1WjGZTDz33HO0bNkSgBkzZrBt2zYyMzMZNmwY999/P3l5eUyYMIGUlBQyMzMJCAjgzTffJC4ujkGDBhESEkJycjIDBgygUaNGvPHGG9jtdk6fPk2rVq2YOnUqAGvWrOHtt99G0zT8/f159dVX+e677zh16hTPPPMMr7/+OnFxcZf9nBs2bMidd97Jnj17ePPNN7n33ntZv349LpeL559/noyMDABuv/12nnzyScaNG0d+fj49e/bkiy++oH79+qxfv56wsDBmz57NsmXLMBqN1KxZk2nTphEUFFQy/wHE31Oiwqhbt67q1q2b6tatm2rdurVq3769mjRpkkpLS1NKKbVs2TL15JNPKofDoZRS6rPPPlPDhw9XSin16KOPqn/+859KKaWys7NV165d1aFDh9TYsWPVRx99pJRSyul0qmeeeUbNmTPHvbz09HS1ZMkSNXLkSPc0bdq0UQcPHlQbN25UAwcOVHl5eUoppX799VfVqVMnpZRSzz//vBoyZMgl38e6devUXXfdpdLT05VSSi1dulR17txZaZqmnn/+edWrVy9lsViUzWZT999/v/r444+Vw+FQXbp0UTt37nS/h86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awPQemxwsPD0dwcDC0tbVhY2ODoUOHKtzUxM3NDcePH4enpye0tbXh7e0Na2trREdHY+3atZgxYwYAYOPGjQo3h2mPjY0NwsLCEBoaiocPH2LUqFFYv349tLW12+yvtcmTJ2PmzJn48ssvFV739vbGli1b8MknnwAAjI2NER8fj4iICMjlcjz33HPYtGlTu7EJBAJEREQgPj4eWVlZsLW1xbRp08Dj8TBhwgQUFhYCAFxcXJCYmAhdXd2nzgfzbGFVWRmGYRglbFqJYRiGUcIGB4ZhGEYJGxwYhmEYJWxwYBiGYZSwwYFhGIZRwgYHhmEYRgkbHBiGYRgl/wMYcPDVOQ94vwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x19861c21b00>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.metrics import roc_auc_score\n",
    "from sklearn.metrics import roc_curve\n",
    "logit_roc_auc = roc_auc_score(y_test, logreg.predict(X_test))\n",
    "fpr, tpr, thresholds = roc_curve(y_test, logreg.predict_proba(X_test)[:,1])\n",
    "plt.figure()\n",
    "plt.plot(fpr, tpr, label='Logistic Regression (area = %0.2f)' % logit_roc_auc)\n",
    "plt.plot([0, 1], [0, 1],'r--')\n",
    "plt.xlim([0.0, 1.0])\n",
    "plt.ylim([0.0, 1.05])\n",
    "plt.xlabel('False Positive Rate')\n",
    "plt.ylabel('True Positive Rate')\n",
    "plt.title('Receiver operating characteristic')\n",
    "plt.legend(loc=\"lower right\")\n",
    "plt.savefig('Log_ROC')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
